package com.tanhua.dubbo.api;

import com.tanhua.mongo.Movement;
import com.tanhua.vo.PageResult;

import java.util.List;

public interface MovementApi {
    PageResult findFriendMovement(Long userId, Integer page, Integer pagesize);

    String publish(Movement movement);

    PageResult findByUserId(Long userId, Integer page, Integer pagesize);

    List<Movement> randomMovement(Integer pagesize);

    List<Movement> pidMovement(List<Long> pids, Integer page, Integer pagesize);

    Movement findById(String id);

    /**
     * 根据多条件查询用户动态
     * @param uid
     * @param state
     * @param page
     * @param pagesize
     * @return
     */
    PageResult findById(Long uid, Integer state, Integer page, Integer pagesize);

    /**
     * 更新动态状态
     * @param movementId
     * @param state
     */
    void update(String movementId, Integer state);
}
